package com.jyh.blog.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * (User)实体类
 *
 * @author jyh
 * @since 2023-02-13 16:24:11
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class User implements Serializable {
    private static final long serialVersionUID = -60808221575580652L;

    @TableId(value = "id",type= IdType.ASSIGN_ID)
    private String id;
    /**
     * 用户信息id
     */
    private String userInfoId;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 登录类型
     */
    private Integer loginType;
    /**
     * 用户登录ip
     */
    private String ipAddress;
    /**
     * ip来源
     */
    private String ipSource;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    /**
     * 上次登录时间
     */
    private LocalDateTime lastLoginTime;


}

